#include <stdio.h>
#include <limits.h>

int main()
{
    int max = INT_MIN, min = INT_MAX, num;
    while(scanf("%d", &num) != EOF)
    {
        if (num > max) {
            max = num;
        }
        if (num < min) {
            min = num;
        }
    }
    printf("max = %d, min = %d\n", max, min);
    return 0;
}
